Optimal. Leaf size=218 \[ \frac {11 \sqrt [4]{-1} \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{4 \sqrt {a} d}+\frac {\left (\frac {1}{2}-\frac {i}{2}\right ) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{\sqrt {a} d}-\frac {\tan ^{\frac {5}{2}}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}}+\frac {7 \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{4 a d}-\frac {3 i \tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.44, antiderivative size = 218, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 9, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.321, Rules used = {3639, 3678,
3682, 3625, 211, 3680, 65, 223, 209} \begin {gather*} \frac {11 \sqrt [4]{-1} \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{4 \sqrt {a} d}-\frac {\tan ^{\frac {5}{2}}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}}-\frac {3 i \tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 a d}+\frac {7 \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{4 a d}+\frac {\left (\frac {1}{2}-\frac {i}{2}\right ) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{\sqrt {a} d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 209
Rule 211
Rule 223
Rule 3625
Rule 3639
Rule 3678
Rule 3680
Rule 3682
Rubi steps
\begin {align*} \int \frac {\tan ^{\frac {7}{2}}(c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx &=-\frac {\tan ^{\frac {5}{2}}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}}-\frac {\int \tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)} \left (-\frac {5 a}{2}+3 i a \tan (c+d x)\right ) \, dx}{a^2}\\ &=-\frac {\tan ^{\frac {5}{2}}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}}-\frac {3 i \tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 a d}-\frac {\int \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)} \left (-\frac {9 i a^2}{2}-\frac {7}{2} a^2 \tan (c+d x)\right ) \, dx}{2 a^3}\\ &=-\frac {\tan ^{\frac {5}{2}}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}}+\frac {7 \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{4 a d}-\frac {3 i \tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 a d}-\frac {\int \frac {\sqrt {a+i a \tan (c+d x)} \left (\frac {7 a^3}{4}-\frac {11}{4} i a^3 \tan (c+d x)\right )}{\sqrt {\tan (c+d x)}} \, dx}{2 a^4}\\ &=-\frac {\tan ^{\frac {5}{2}}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}}+\frac {7 \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{4 a d}-\frac {3 i \tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 a d}-\frac {11 \int \frac {(a-i a \tan (c+d x)) \sqrt {a+i a \tan (c+d x)}}{\sqrt {\tan (c+d x)}} \, dx}{8 a^2}+\frac {\int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\tan (c+d x)}} \, dx}{2 a}\\ &=-\frac {\tan ^{\frac {5}{2}}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}}+\frac {7 \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{4 a d}-\frac {3 i \tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 a d}-\frac {11 \text {Subst}\left (\int \frac {1}{\sqrt {x} \sqrt {a+i a x}} \, dx,x,\tan (c+d x)\right )}{8 d}-\frac {(i a) \text {Subst}\left (\int \frac {1}{-i a-2 a^2 x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}\\ &=\frac {\left (\frac {1}{2}-\frac {i}{2}\right ) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{\sqrt {a} d}-\frac {\tan ^{\frac {5}{2}}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}}+\frac {7 \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{4 a d}-\frac {3 i \tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 a d}-\frac {11 \text {Subst}\left (\int \frac {1}{\sqrt {a+i a x^2}} \, dx,x,\sqrt {\tan (c+d x)}\right )}{4 d}\\ &=\frac {\left (\frac {1}{2}-\frac {i}{2}\right ) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{\sqrt {a} d}-\frac {\tan ^{\frac {5}{2}}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}}+\frac {7 \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{4 a d}-\frac {3 i \tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 a d}-\frac {11 \text {Subst}\left (\int \frac {1}{1-i a x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{4 d}\\ &=\frac {11 \sqrt [4]{-1} \tan ^{-1}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{4 \sqrt {a} d}+\frac {\left (\frac {1}{2}-\frac {i}{2}\right ) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{\sqrt {a} d}-\frac {\tan ^{\frac {5}{2}}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}}+\frac {7 \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{4 a d}-\frac {3 i \tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 3.48, size = 224, normalized size = 1.03 \begin {gather*} \frac {-\frac {2 e^{i (c+d x)} \left (-1+e^{2 i (c+d x)}\right )^{3/2} \left (4 \tanh ^{-1}\left (\frac {e^{i (c+d x)}}{\sqrt {-1+e^{2 i (c+d x)}}}\right )-11 \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {2} e^{i (c+d x)}}{\sqrt {-1+e^{2 i (c+d x)}}}\right )\right )}{\left (-\frac {i \left (-1+e^{2 i (c+d x)}\right )}{1+e^{2 i (c+d x)}}\right )^{3/2} \left (1+e^{2 i (c+d x)}\right )^2}+\sec ^2(c+d x) (9+5 \cos (2 (c+d x))+i \sin (2 (c+d x))) \sqrt {\tan (c+d x)}}{8 d \sqrt {a+i a \tan (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 666 vs. \(2 (170 ) = 340\).
time = 0.20, size = 667, normalized size = 3.06
method | result | size |
derivativedivides | \(-\frac {\left (\sqrt {\tan }\left (d x +c \right )\right ) \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, \left (2 i \sqrt {i a}\, \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a \left (\tan ^{2}\left (d x +c \right )\right )+4 i \sqrt {i a}\, \sqrt {-i a}\, \left (\tan ^{3}\left (d x +c \right )\right ) \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-2 i \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) \sqrt {i a}\, a -22 i \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) a \sqrt {-i a}\, \tan \left (d x +c \right )+16 i \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\, \tan \left (d x +c \right )+4 \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) \sqrt {i a}\, \sqrt {2}\, a \tan \left (d x +c \right )+11 \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a \left (\tan ^{2}\left (d x +c \right )\right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\, \left (\tan ^{2}\left (d x +c \right )\right )-11 \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) a \sqrt {-i a}+14 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\right )}{8 d a \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\, \left (-\tan \left (d x +c \right )+i\right )^{2}}\) | \(667\) |
default | \(-\frac {\left (\sqrt {\tan }\left (d x +c \right )\right ) \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, \left (2 i \sqrt {i a}\, \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a \left (\tan ^{2}\left (d x +c \right )\right )+4 i \sqrt {i a}\, \sqrt {-i a}\, \left (\tan ^{3}\left (d x +c \right )\right ) \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-2 i \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) \sqrt {i a}\, a -22 i \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) a \sqrt {-i a}\, \tan \left (d x +c \right )+16 i \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\, \tan \left (d x +c \right )+4 \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) \sqrt {i a}\, \sqrt {2}\, a \tan \left (d x +c \right )+11 \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a \left (\tan ^{2}\left (d x +c \right )\right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\, \left (\tan ^{2}\left (d x +c \right )\right )-11 \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) a \sqrt {-i a}+14 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\right )}{8 d a \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\, \left (-\tan \left (d x +c \right )+i\right )^{2}}\) | \(667\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 658 vs. \(2 (160) = 320\).
time = 0.44, size = 658, normalized size = 3.02 \begin {gather*} \frac {\sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} {\left (3 \, e^{\left (4 i \, d x + 4 i \, c\right )} + 9 \, e^{\left (2 i \, d x + 2 i \, c\right )} + 2\right )} + {\left (a d e^{\left (3 i \, d x + 3 i \, c\right )} + a d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {-\frac {2 i}{a d^{2}}} \log \left (\frac {1}{4} \, a d \sqrt {-\frac {2 i}{a d^{2}}} e^{\left (i \, d x + i \, c\right )} + \frac {1}{4} \, \sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} {\left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )}\right ) - {\left (a d e^{\left (3 i \, d x + 3 i \, c\right )} + a d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {-\frac {2 i}{a d^{2}}} \log \left (-\frac {1}{4} \, a d \sqrt {-\frac {2 i}{a d^{2}}} e^{\left (i \, d x + i \, c\right )} + \frac {1}{4} \, \sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} {\left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )}\right ) - {\left (a d e^{\left (3 i \, d x + 3 i \, c\right )} + a d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {-\frac {121 i}{16 \, a d^{2}}} \log \left (\frac {208 \, {\left (11 \, \sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} {\left (e^{\left (3 i \, d x + 3 i \, c\right )} + e^{\left (i \, d x + i \, c\right )}\right )} + 2 \, {\left (3 \, a d e^{\left (2 i \, d x + 2 i \, c\right )} - a d\right )} \sqrt {-\frac {121 i}{16 \, a d^{2}}}\right )}}{6655 \, {\left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )}}\right ) + {\left (a d e^{\left (3 i \, d x + 3 i \, c\right )} + a d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {-\frac {121 i}{16 \, a d^{2}}} \log \left (\frac {208 \, {\left (11 \, \sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} {\left (e^{\left (3 i \, d x + 3 i \, c\right )} + e^{\left (i \, d x + i \, c\right )}\right )} - 2 \, {\left (3 \, a d e^{\left (2 i \, d x + 2 i \, c\right )} - a d\right )} \sqrt {-\frac {121 i}{16 \, a d^{2}}}\right )}}{6655 \, {\left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )}}\right )}{4 \, {\left (a d e^{\left (3 i \, d x + 3 i \, c\right )} + a d e^{\left (i \, d x + i \, c\right )}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\mathrm {tan}\left (c+d\,x\right )}^{7/2}}{\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________